<?php
    $from = $_GET['from'];
    $to = $_GET['to'];
    $Key = " ";  //apiKey  北京市海淀区彩和坊路海淀西大街74号
    $tencentApi = "https://apis.map.qq.com/ws/direction/v1/driving/";
    $result = file_get_contents($tencentApi."?from=".$from."&to=".$to."&key=".$Key);

    $s = json_decode($result, true);
    echo(json_encode($s));

?>